package cn.lyj.entity;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;

/**
 * BizClaimVoucher entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "biz_claim_voucher", catalog = "jboadb")

public class BizClaimVoucher implements java.io.Serializable {

	// Fields

	private Integer id;
	private SysEmployee nextDealSn;
	private SysEmployee sysEmployee;
	private Date createTime;
	private String event;
	private Double totalAccount;
	private String status;
	private Date modifyTime;
	private List<BizClaimVoucherDetail> DetailList;
	private List<BizCheckResult> checkResultList;
	// Constructors

	/** default constructor */
	public BizClaimVoucher() {
	}

	/** minimal constructor */
	public BizClaimVoucher(String createSn, Date createTime, String event, Double totalAccount, String status) {
		this.createTime = createTime;
		this.event = event;
		this.totalAccount = totalAccount;
		this.status = status;
	}

	/** full constructor */
	public BizClaimVoucher(String nextDealSn, String createSn, Date createTime, String event, Double totalAccount,
			String status, Date modifyTime) {
		this.createTime = createTime;
		this.event = event;
		this.totalAccount = totalAccount;
		this.status = status;
		this.modifyTime = modifyTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")

	@Column(name = "ID", unique = true, nullable = false)

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NEXT_DEAL_SN", nullable = false)

	public SysEmployee getNextDealSn() {
		return nextDealSn;
	}

	public void setNextDealSn(SysEmployee nextDealSn) {
		this.nextDealSn = nextDealSn;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CREATE_SN", nullable = false)
	
	public SysEmployee getSysEmployee() {
		return sysEmployee;
	}

	public void setSysEmployee(SysEmployee sysEmployee) {
		this.sysEmployee = sysEmployee;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CREATE_TIME", nullable = false, length = 10)

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "EVENT", nullable = false)

	public String getEvent() {
		return this.event;
	}

	public void setEvent(String event) {
		this.event = event;
	}

	@Column(name = "TOTAL_ACCOUNT", nullable = false, precision = 20)

	public Double getTotalAccount() {
		return this.totalAccount;
	}

	public void setTotalAccount(Double totalAccount) {
		this.totalAccount = totalAccount;
	}

	@Column(name = "STATUS", nullable = false, length = 20)

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "MODIFY_TIME", length = 10)

	public Date getModifyTime() {
		return this.modifyTime;
	}
	
	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
	
	@OneToMany(mappedBy = "bizClaimVoucher",cascade = { CascadeType.ALL})
	
	public List<BizClaimVoucherDetail> getDetailList() {
		return DetailList;
	}

	public void setDetailList(List<BizClaimVoucherDetail> detailList) {
		DetailList = detailList;
	}
	
	@OneToMany(mappedBy = "bizClaimVoucher",cascade = { CascadeType.ALL})
	
	public List<BizCheckResult> getCheckResultList() {
		return checkResultList;
	}

	public void setCheckResultList(List<BizCheckResult> checkResultList) {
		this.checkResultList = checkResultList;
	}
	
}